package com.ruoyi.web.controller.app.controller;

import com.ruoyi.framework.web.exception.base.XResult;
import com.ruoyi.web.controller.app.service.AppGoldPackageService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName AppGoldPackageController
 * @Description TODO
 * @Author tyc@yanyu
 * @Date 2018/12/29 0029 09:15
 **/
@RequestMapping("/app/gold")
@RestController
@Api(tags = "金包")
public class AppGoldPackageController {
    @Autowired
    private AppGoldPackageService appGoldPackageService;

    @PostMapping("getGoldList")
    @ApiOperation(value = "获取红包、金包列表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "redId", value = "红包id", required = true, dataType = "String", paramType = "query"),
            @ApiImplicitParam(name = "type", value = "类型 3、红包   4、金包", required = true, dataType = "String", paramType = "query")
    })
    public XResult getGoldList(String redId,int type){
        return new XResult("操作成功",appGoldPackageService.getGoldList(redId,type));
    }
}
